package com.cdtye.shuoh.service.device;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cdtye.shuoh.domain.device.entity.DeviceTopic;
import com.cdtye.shuoh.domain.device.vo.DeviceTopicVo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface DeviceTopicService extends IService<DeviceTopic> {
    /**
     * 新增topic
     * @param record
     * @return
     */
    int insertDeviceTopic(DeviceTopic record);

    /**
     * 根据发布者获取topic
     * @param publisher
     * @return
     */
    List<DeviceTopic> findByPublisher(String publisher);

    /**
     * 根据类型获取topic
     * @param type
     * @return
     */
    List<DeviceTopic> findByType(String type);

    /**
     * 分页查询
     * @param vo
     * @return
     */
    IPage<DeviceTopic> pageList(DeviceTopicVo vo);

    /**
     * 根据设备标识删除topic
     * @param deviceIdentification
     * @return
     */
    int deleteByDeviceIdentification(String deviceIdentification);
}
